{% extends "base.html" %}
{% load i18n %}
{% load i18n avatar_tags %}
{% load static from staticfiles %}

{% block extra_head %}
      <link href="{{ STATIC_URL }}css/site_base.css" rel="stylesheet"/>
      <link href="{{ STATIC_URL }}css/custom.css" rel="stylesheet"/>
      <link rel="shortcut icon" href="{{ STATIC_URL }}img/favicon.ico">

    <script>
        var siteUrl = '{{ SITEURL }}'.replace(/\/?$/, '/');
        var staticUrl = '{% static '' %}';
    </script>
{% endblock %}
{% block extra_tab %}
<li id="nav_osk">
  <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{% trans "Sensors" %}<i class="fa fa-angle-down fa-lg"></i></a>
  {% if user.is_authenticated %}
  <ul class="dropdown-menu">
    <li><a href="{% url "osk_browse" %}?limit={{ CLIENT_RESULTS_LIMIT }}">{% trans "Explore Sensors" %}</a></li>
    {% if perms.osk.admin_sos %}
    <li><a href="{% url "osk_browse" %}#ediclient_container">{% trans "Register a new  Sensor" %}</a></li>
    {% endif %}
  </ul>
  {% else %}
  <ul class="dropdown-menu">
    <li><a href="{% url "osk_browse" %}?limit={{ CLIENT_RESULTS_LIMIT }}">{% trans "Sensors" %}</a></li>
  </ul>
  {% endif %}
</li>
<li><a href="{% url "about_services" %}">{% trans "Services" %}</a></li>
{% endblock %}



{% block extra_script %}
{{ block.super }}
<!-- TODO: caricare questa libreria solo per la mappa -->
<script src="{{STATIC_URL}}geosk/js/flotcharts.js" type="text/javascript"></script>
<style>
/* flotcharts on map_view */
.chart {
  height: 100%;
}
</style>
{% endblock extra_script %}

{% block footer %}
<footer>
    <div class="container">
        <div class="row">
            <div class="col-md-6 text-left">
                Geoinformation Enabling ToolkIT starterkit&reg; GET-IT
                {% trans " is conceived and developed by <a target=\"_blank\" href=\"http://www.get-it.it/#team\">research team</a>" %}
                | <a href="mailto:getitskinfo@gmail.com">{% trans "Contacts" %} </a>
                | <a href="{% url "sk_license" %}">{% trans "Legal Notes" %} </a>
                | <a href="{% url "sk_credits" %}">{% trans "Credits" %} </a>
            </div>
            <div class="col-md-6 text-right">
                <ul class="list-unstyled">
                    <li>GET-IT{% trans " is based on" %} <a href="http://geonode.org">{% trans "GeoNode" %}</a> <em>{% trans "version" %} {{ VERSION }}</em></li>
                </ul>
                <label class="hidden">{% trans "Language" %}</label>
                {% if csrf_token != "NOTPROVIDED" %}
                {% get_current_language as LANGUAGE %}
                <form class="form-inline" action="/i18n/setlang/" method="post">
                    {% csrf_token %}
                    <select class="col-md-6 pull-right" name="language" onchange="javascript:form.submit()">
                        {% for lang in LANGUAGES %}
                        <option value="{{ lang.0 }}" {% ifequal LANGUAGE_CODE lang.0 %} selected="selected"{% endifequal %}>
                            {{ lang.1 }}
                        </option>
                        {% endfor %}
                    </select>
                </form>
                {% endif %}
            </div>
        </div>
    </div>
</footer>
{% endblock footer %}
